config/internal: add clevis override support#1031
Conversation
|
Open question: should validation fail if both overrides & regular clevis configuration options are specified? I'm leaning towards yes but wanted to ask. Conflicting configs can be written otherwise e.x.: |
|
Hmm, I wonder if we should reframe #1019 as support for "custom" pins instead? So e.g. "luks": [
{
"name": "luksroot",
"device": "/dev/md/foobar",
"clevis": {
"tpm2": true,
"custom": {
"pin": "my-custom-pin",
"config": "{\"custom-field\": \"custom-value\"}"
}
},
"label": "root"
}
],would use One thing we could do down the road then is that if |
|
/cc @puiterwijk -- this is about the comment you initially raised here. |
My personal (slight) leaning would be to keep it as a complete override. |
Sure, I also see the appeal in that. The reason I suggested it was so that users could still leverage Ignition's built-in In that case yes, I agree we should make it an error if any other pinning options are specified. (Though small bikeshed: I'd still call it e.g. |
|
I've written up a few different potential paths, do either of 2 or 3 encapsulate your proposal?
|
|
Sorry for the delay on this. I think just going with what you have here works. Two things:
|
If they're specified inside the config or if they're specified as the custom pin? |
The former. In a custom pin users can then just do whatever they want. |
b9dd472 to
d2c982d
Compare
|
Ok, this is rebased, updated, and tested. Should be good for review. |
7130bac to
aecb0cc
Compare
|
Updated. |
jlebon
left a comment
There was a problem hiding this comment.
Nice and simple! LGTM overall, just some minor nits.
| * **thumbprint** (string): thumbprint of a trusted signing key. | ||
| * **_tpm2_** (bool): whether or not to use a tpm2 device. | ||
| * **_threshold_** (int): sets the minimum number of pieces required to decrypt the device. | ||
| * **_custom_** (object): overrides the clevis configuration. The `pin` & `config` will be passed directly to `clevis luks bind`. If specified, all other clevis options must be omitted. |
There was a problem hiding this comment.
Not new here so we can address this in a follow-up, but WDYT about using the proper noun "Clevis" (capitalized) in descriptions to match upstream?
Adds new custom options that allow for the direct specification of the clevis pin & configuration JSON that will be passed to `clevis luks bind`.
aecb0cc to
776f321
Compare
|
Updated the error messages. Merging on green. |
Adds new override options that allow for the direct specification of the
clevis pin & configuration JSON that will be passed to
clevis luks bind.Closes #1019